import { ExtractPropTypes, PropType } from 'vue'

export const checkboxProps = {
  label: {
    type: String,
    default: ''
  },
  value: {
    type: String,
    default: ''
  },
  modelValue: {
    type: Boolean,
    default: undefined
  },
  halfChecked: {
    type: Boolean,
    default: false
  },
  disabled: {
    type: Boolean,
    default: false
  },
  isTitle: {
    type: Boolean,
    default: true
  },
  direction: {
    type: String, //'row' | 'column'
    default: 'row'
  },
  onChange: {
    type: Function,
    default: undefined
  }
}

export type CheckboxProps = ExtractPropTypes<typeof checkboxProps>

export const checkboxEmit = ['update:modelValue', 'change']

export type CheckboxEmit = typeof checkboxEmit
